package com.walnut.lom_system.common.lang;

/**
 * @author chenhetao
 * @version 1.0
 * @className RegularExpression
 * @description TODO
 * @date 2022/5/12 19:59
 */
public class RegularExpression {
    /**
     * 手机号
     */
    public static final String EXP_PHONE = "^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\\d{8}$";
    /**
     * 姓名
     */
    public static final String EXP_NAME = "^[\\u4e00-\\u9fa5]{2,4}$";
    /**
     * 电子邮箱
     */
    public static final String EXP_EMAIL = "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$";
    /**
     * 身份证号码 普通校验
     */
    public static final String EXP_ID_NORMAL = "(^\\d{15}$)|(^\\d{18}$)|(^\\d{17}(\\d|X|x)$)";
    /**
     * 身份证号码 严格校验
     */
    public static final String EXP_ID_STRICT = "^[1-9]\\d{5}(19|20)\\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$";
    /**
     * 15位身份证校验（一代身份证）
     */
    public static final String EXP_ID_15 = "^[1-9]\\d{5}\\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\\d{2}[0-9Xx]$";
    /**
     * 身份证号码 后六位校验
     */
    public static final String EXP_ID_LAST6 = "^(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$";
    /**
     * qq号校验
     */
    public static final String EXP_QQ = "^[1-9][0-9]\\d{4,9}$";
    /**
     * 邮政编码校验
     */
    public static final String EXP_POSTAL_CODE = "^[1-9]\\d{5}$";
}
